package Controller.MonthGenre;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import Bean.joinHadoopBean;
import Dao.MonthGenreDao;

public class JulyChartContoller implements Controller{
	private MonthGenreDao dao;
	public void setDao(MonthGenreDao dao) {
		this.dao = dao;
	}
	@Override
	public ModelAndView handleRequest(HttpServletRequest req,
			HttpServletResponse arg1) throws Exception {
		System.out.println("1월 장르 선호도 클래스");
		
		List<joinHadoopBean> julychart = dao.julychart();
		for (joinHadoopBean joinHadoopBean : julychart) {
			System.out.println("============================");
			System.out.println(joinHadoopBean.getGenrebean().getG_genre());
			System.out.println(joinHadoopBean.getMonthglbean().getMogl_count());
		}
		ModelAndView mav = new ModelAndView();
		mav.setViewName("julychart");
		mav.addObject("julychart",julychart);
		return mav;
	}

}
